package com.ofhb.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name="hall_price")
public class HallPriceEntity implements Serializable {
	/*
	 * id serial NOT NULL,
	  hall_id integer NOT NULL,
	  start_time timestamp with time zone NOT NULL,
	  hourly numeric(10,2) NOT NULL DEFAULT 0,
	  daily numeric(10,2) NOT NULL DEFAULT 0,
   */
	
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@ManyToOne(cascade= CascadeType.ALL)
	@JoinColumn(name="hall_id", referencedColumnName ="id", updatable=true)
	private HallEntity hallEntity;
	
	@Column(name = "start_time")
	@Temporal(value = TemporalType.DATE)
	private Date startTime;
	
	@Column(name = "end_time")
	@Temporal(value = TemporalType.DATE)
	private Date endTime;
	
	@Column(name = "hourly")
	private Double hourly;
	
	@Column(name = "daily")
	private Double daily;

	public HallEntity getHallEntity() {
		return hallEntity;
	}

	public void setHallEntity(HallEntity hallEntity) {
		this.hallEntity = hallEntity;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Double getHourly() {
		return hourly;
	}

	public void setHourly(Double hourly) {
		this.hourly = hourly;
	}

	public Double getDaily() {
		return daily;
	}

	public void setDaily(Double daily) {
		this.daily = daily;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
}
